package myJs

import myJs.analysis.Analysis
import myJs.browse.Browse
import myJs.cps.Style
import myJs.download.Download
import myJs.explore.Explore
import myJs.statistics.Statistics
import myJs.help.Help
import myJs.contact.Contact
import myJs.myPkg.{CSSTransition, TransitionGroup, _}
import myJs.search.Search
import myJs.search.circDetail.CircDetail
import myJs.search.detail.Detail
import slinky.core._
import slinky.core.annotations.react
import slinky.web.html._

import scala.scalajs.js
import scala.scalajs.js.annotation.JSImport

@react object App {
  type Props = Unit

  val component = FunctionalComponent[Props] { props =>

    val location = ReactRouterDOM.useLocation()

    div(className := "App")(
      Routes(
        Route(path = "/", element = IndexCp()),
        Route(path = Index.path, element = IndexCp()),
        Route(path = Browse.path, element = Browse.cpE),
        Route(path = Search.path, element = Search.cpE),
        Route(path = Detail.path, element = Detail.cpE),
        Route(path = CircDetail.path, element = CircDetail.cpE),
        Route(path = Analysis.path, element = Analysis.cpE),
        Route(path = Explore.path, element = Explore.cpE),
        Route(path = Download.path, element = Download.cpE),
        Route(path = Statistics.path, element = Statistics.cpE),
        Route(path = Help.path, element = Help.cpE),
        Route(path = Contact.path, element = Contact.cpE),

      ),



    )

  }


}
